#include "loginfactory.h"
#include "Modules/ModuleInterface.h"
#include "Modules/NetWorkInterface.h"
#include "Modules/TcpNetwork.h"
#include "Modules/loginmodule.h"
#include "loginfunctionality.h"

loginFactory::loginFactory()
    : FunctionalityFactory()
{}

std::shared_ptr<FunctionalityInterface> loginFactory::create()
{
    //首先需要创建TCP模块和申请证书模块
    std::shared_ptr<NetworkInterface> network = std::make_shared<TcpNetwork>();
    std::shared_ptr<ModuleInterface> module = std::make_shared<loginModule>();

    std::shared_ptr<FunctionalityInterface> function = std::make_shared<loginFunctionality>(network,
                                                                                            module);
    return function;
}
